package io.github.sunshine001.guava;

import java.util.LinkedHashMap;
import java.util.Map;

public class GResult<T> {
    public final String code;
    public final String message;
    public final T data;

    public GResult(String code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Map<String, Object> build() {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("code", code);
        map.put("message", message);
        map.put("data", data);
        return map;
    }
}
